#include <stdio.h>
#include <string.h>

void blank()
{
    char *data = "  ";
    char *pstr = NULL;

    pstr = strstr(data, "ao");

    if (pstr != NULL) {
        printf("pstr = %s\n", pstr);
    }
    else {
        printf("pstr is blank\n");
    }
}

void gga()
{
	char * pstr = NULL;
	char *gga_rmc = "\r\n$GNRMC,082935.000,A,2307.335517,N,11320.737380,E,0.000,0.00,010221,,E,A*09\r\n$GNGGA,082935.000,2307.335517,N,11320.737380,E,1,15,0.83,66.504,M,0,M,,*6E\r\n";
	char *needle = "\r\n";
	char *result[8];
	int i = 0;

	pstr = strstr(gga_rmc, needle);

	while( pstr != NULL )
	{	
		printf("pstr = %s\n", pstr);				
		gga_rmc = pstr + strlen(needle);
		/* Get next token: */
		pstr = strstr( gga_rmc, needle);
	}
}

void main()
{
	blank();

	gga();
}
